﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="cuotas.aspx.cs" Inherits="cuotas" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
    .style9
    {
        width: 128px;
        text-align: right;
    }
    .style10
    {
        text-align: right;
    }
        .style11
        {
            width: 61px;
            text-align: left;
        }
        .style12
        {
            width: 158px;
            text-align: right;
            height: 26px;
        }
        .style14
        {
            width: 77px;
            text-align: left;
            height: 26px;
        }
        .style15
        {
            height: 26px;
        }
        .style16
        {
            width: 77px;
            text-align: right;
            height: 26px;
        }
        .style17
        {
            width: 158px;
            text-align: right;
            height: 23px;
        }
        .style18
        {
            width: 157px;
            text-align: right;
            height: 23px;
        }
        .style19
        {
            width: 77px;
            text-align: right;
            height: 23px;
        }
        .style20
        {
            height: 23px;
            width: 143px;
        }
        .style21
        {
            width: 77px;
            text-align: right;
        }
        .style22
        {
            width: 116px;
            text-align: right;
        }
        .style25
        {
            width: 157px;
            text-align: left;
        }
        .style26
        {
            width: 157px;
            text-align: left;
            height: 26px;
        }
        .style27
        {
            width: 143px;
        }
        .style28
        {
            height: 26px;
            width: 143px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContenido" Runat="Server">
    <asp:Panel ID="pnlCuota" runat="server">
    <table class="style1">
        <tr>
            <td class="style22">
                &nbsp;</td>
            <td class="style9">
                &nbsp;</td>
            <td class="style11">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style22">
                DNI Socio:</td>
            <td class="style9">
                <asp:TextBox ID="txtDniSocio" runat="server"></asp:TextBox>
            </td>
            <td class="style11">
                <asp:Button ID="btnBuscarSocio" runat="server" onclick="btnBuscarSocio_Click" 
                    Text="Buscar" />
            </td>
            <td>
               
                <asp:RequiredFieldValidator ID="rfvDniSocio" runat="server" 
                    ControlToValidate="txtDniSocio" ErrorMessage="Ingrese DNI socio">*</asp:RequiredFieldValidator>
                <asp:CompareValidator ID="cvDniSocio" runat="server" 
                    ControlToValidate="txtDniSocio" ErrorMessage="DNI formato incorrecto" 
                    Operator="GreaterThan" Type="Integer" ValueToCompare="0">*</asp:CompareValidator>
               
            </td>
        </tr>
        <tr>
            <td class="style22">
                &nbsp;</td>
            <td class="style9">
                
            </td>
            <td class="style11">
                &nbsp;</td>
            <td> <asp:HiddenField ID="txtID" runat="server" />
                &nbsp;</td>
        </tr>        
    </table>
</asp:Panel>
    <asp:Panel ID="pnlDetalleCuotas" runat="server" Visible="False">
     <table class="style1">
    <tr>
            <td class="style10">
                Nombre y Apellido:</td>
            <td class="style25">
                <asp:TextBox ID="txtNombre" runat="server" Enabled="False" Width="182px"></asp:TextBox>
            </td>
            <td class="style21">
                &nbsp;</td>
            <td class="style27">
                <asp:HiddenField ID="txtIdCuota" runat="server" />
            </td>
        </tr>
         <tr>
             <td class="style17">
             </td>
             <td class="style18">
             </td>
             <td class="style19">
             </td>
             <td class="style20">
                 <asp:HiddenField ID="band" runat="server" Value="0" />
             </td>
         </tr>
         <tr>
             <td class="style12">
                 Clase:</td>
             <td class="style26">
                 <asp:DropDownList ID="ddlClase" runat="server" Height="22px" 
                     style="text-align: left" Width="178px">
                 </asp:DropDownList>
             </td>
             <td class="style14">
             </td>
             <td class="style28">
             </td>
         </tr>
         <tr>
             <td class="style10">
                 Fecha Inicio:</td>
             <td class="style25">
                 <asp:TextBox ID="txtFechaInicio" runat="server" style="text-align: left"></asp:TextBox>
                 <asp:CompareValidator ID="cvFechaInicio" runat="server" 
                     ControlToValidate="txtFechaInicio" ErrorMessage="fecha Invalida" 
                     Operator="GreaterThan" Type="Date" ValueToCompare="01/01/1600">*</asp:CompareValidator>
             </td>
             <td class="style21">
                 Fecha Fin:</td>
             <td class="style27">
                 <asp:TextBox ID="txtFechaFin" runat="server"></asp:TextBox>
                 <asp:CompareValidator ID="cvFechaFin" runat="server" 
                     ControlToValidate="txtFechaFin" ErrorMessage="Fecha invalida" 
                     Operator="GreaterThan" Type="Date" ValueToCompare="01/01/1600">*</asp:CompareValidator>
             </td>
         </tr>
         <tr>
             <td class="style12">
                 Precio:</td>
             <td class="style26">
                 <asp:TextBox ID="txtPrecio" runat="server"></asp:TextBox>
             </td>
             <td class="style16">
             </td>
             <td class="style28">
             </td>
         </tr>
         <tr>
             <td class="style10">
                 Observaciones:</td>
             <td class="style25">
                 <asp:TextBox ID="txtObservacion" runat="server"></asp:TextBox>
             </td>
             <td class="style21">
                 &nbsp;</td>
             <td class="style27">
                 &nbsp;</td>
         </tr>
         <tr>
             <td class="style10">
                 Descuento:</td>
             <td class="style25">
                 <asp:TextBox ID="txtDescuento" runat="server"></asp:TextBox>
             </td>
             <td class="style21">
                 &nbsp;</td>
             <td class="style27">
                 &nbsp;</td>
         </tr>
         <tr>
             <td class="style10">
                 &nbsp;</td>
             <td class="style25">
                 <asp:Button ID="btnAgregarDetalle" runat="server" onclick="btnGuardar_Click" 
                     style="text-align: right" Text="Agregar Detalle" />
             </td>
             <td class="style21">
                 &nbsp;</td>
             <td class="style27">
                 &nbsp;</td>
         </tr>
         <tr>
             <td class="style10" colspan="4">
                 <asp:ValidationSummary ID="vsCuotas" runat="server" 
                     HeaderText="Errores en los siguientes campos" ShowMessageBox="True" 
                     ShowSummary="False" />
             </td>
         </tr>
         <tr>
             <td class="style10" colspan="4">
                 &nbsp;</td>
         </tr>
         </table>
         <asp:GridView ID="dgvCuotas" runat="server" AutoGenerateColumns="False">
                     <Columns>
                         <asp:BoundField DataField="Clase.mostrarClase" HeaderText="Clase" />
                         <asp:BoundField DataField="precio" HeaderText="Precio" />
                         <asp:BoundField DataField="FechaInicio" HeaderText="Fecha Inicio" />
                         <asp:BoundField DataField="FechaFin" HeaderText="Fecha Fin" />
                         <asp:BoundField DataField="observaciones" HeaderText="Observaciones" />
                         <asp:BoundField DataField="descuento" HeaderText="Descuento" />
                     </Columns>
                 </asp:GridView>
                                  <asp:Button ID="bntGrabar" runat="server" Text="Grabar" 
                     onclick="bntGrabar_Click" />
             
    </asp:Panel>
    <asp:Label ID="lblMje" runat="server" style="text-align: right" ForeColor="Red"></asp:Label>
</asp:Content>

